<!--
 * @Description: 单选 基础组件
 * @Version: 0.0.1
 * @Autor: zhj1214
 * @Date: 2021-06-02 16:07:15
 * @LastEditors: zhj1214
 * @LastEditTime: 2021-06-04 14:59:34
-->
<template>
  <div class="view">
    <div v-if="componentData.componentTemplateType == 'Radio'">
      <Radio
        v-for="(item, index) in componentData.listRadio"
        :key="index"
        v-bind="attrsCopy"
        v-on="$listeners"
        v-model="componentData.model"
        :style="componentData.componentsStyle"
        :label="item.value"
        >{{ item.label }}</Radio
      >
    </div>
    <div v-else>
      <RadioGroup
        v-model="componentData.model"
        v-bind="$attrs"
        v-on="$listeners"
      >
        <Radio
          v-for="(item, index) in componentData.listRadio"
          :key="index"
          :label="item.value"
          >{{ item.label }}</Radio
        >
      </RadioGroup>
    </div>
  </div>
</template>

<script>
import formMixin from "./formMixins";

export default {
  name:'formRadio',
  props: {
    type: String
  },
  mixins: [formMixin]
};
</script>
